﻿var Site = Site || {};

/*------------------------------------------------------------------------------------*/
Site.Init = function () {

}

/*------------------------------------------------------------------------------------*/
Site.InitHandlers = function () {
	/* SELECTION LIST ITEM CLICK */
	$(".selection-list-item").on("click", function () {
		
		Site.HandlSelectionListItemClick(this);
	});
}

/*------------------------------------------------------------------------------------*/
Site.HandlSelectionListItemClick = function (item) {
	$item = $(item);
	$list = $item.parent(".selection-list")

	if ($list.attr("multi-select") != "true") {
		$list.children().removeClass("selected");
		$item.addClass("selected");
	}
	else {
		$item.toggleClass("selected");
	}
}

/*====================================================================================*/
$(document).on("ready", function () {
	Site.Init();
	Site.InitHandlers();
});
